<div id="ContentGroup">
    <div class="count-header">
        <a>菜单项信息添加</a>
    </div>
    <div class="count-content-group">
        <div class="count-content">
            <form  id="CDXXX_Update" data-role="form" data-event="finish" data-type="post" data-url="<{'CDXXX_Update_Action'|U}>">
    <input type="hidden" id="CDXXX_BH_ORA"  name="CDXXX_BH_ORA" value="<{$Model->CDXXX_BH|security_encript}>" />
                <div class="count-content-title">菜单项信息</div>
                <div class="count-content-type"><{*此处添加全局注释*}></div>
                <div class="form-list-item">
                    <label class="form-list-item-label">菜单信息</label>
                    <{$cdxx= CDXX::query()}>
                    <{'CDXX_BH'|html_dropdownlist:$cdxx.DataList:$Model->CDXX_BH:'CDXX_BH':'CDXX_MC'}>
                    <p class="form-list-item-tip"></p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>名称</label>
                    <input type="text" id="CDXXX_MC" name="CDXXX_MC" value="<{$Model->CDXXX_MC }>"/>
                    <p class="form-list-item-tip">在左侧导航菜单中的显示名称</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>显示顺序</label>
                    <{'CDXXX_XSSX'|html_dropdownlist:["1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "10" , "11" , "12" , "13" , "14" , "15" , "16" , "17" , "18" , "19" , "20"]:$Model->CDXXX_XSSX}>
                    <p class="form-list-item-tip">默认信息将按从小到大顺序排列</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label"><span style="color: red">*</span>类型</label>
                    <{'CDXXX_LX'|html_dropdownlist:["功能项目" , "功能列表"]:$Model->CDXXX_LX}>
                    <p class="form-list-item-tip">功能项目表示点击后跳转到指定的链接，功能列表表示点击后跳转至对应的子菜单列表</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label">链接</label>
                    <input type="text" id="CDXXX_LJ" name="CDXXX_LJ" value="<{$Model->CDXXX_LJ }>"/>
                    <p class="form-list-item-tip">当类型为功能项目时，填写调准的目标连接，否则留空</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label">图片</label>
                    <input type="text" id="CDXXX_TP"  name="CDXXX_TP"  value="<{$Model->CDXXX_TP }>" />
                    <span id="CDXXX_TPImage" class="button" >选择图片</span>
                    <p class="form-list-item-tip">本地上传200*200的图片，或输入远程图片url</p>
                </div>
                <div class="form-list-item">
                    <label class="form-list-item-label">备注</label>
                    <textarea id="CDXXX_BZ" name="CDXXX_BZ"><{$Model->CDXXX_BZ }></textarea>
                    <p class="form-list-item-tip">可输入不超过300个汉字的纯文本信息，用于功能介绍，允许留空</p>
                </div>
            </form>     
            <div class="form-operation">
                <span class="button" id="CDXXX_Update-Submit">提交</span>
                <span class="button" data-role="back">返回</span>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $("#ContentGroup").formset(0);//开启页面标签页
        //$("#CDXXX_Insert").vtip();//开启鼠标提示.
        
        $("#CDXXX_Update").validate({
            rules:{
                "CDXXX_BH":{
                    "maxlength":50 ,
                    "required":true 
                }, 
                "CDXX_BH":{
                    "maxlength":50 ,
                    "required":true 
                }, 
                "CDXXX_MC":{
                    "maxlength":50 ,
                    "required":true 
                }, 
                "CDXXX_XSSX":{
                    "required":true 
                }, 
                "CDXXX_LX":{
                    "maxlength":50 ,
                    "required":true 
                }, 
                "CDXXX_LJ":{
                    "maxlength":500 
                }, 
                "CDXXX_TP":{
                    "maxlength":500 
                }, 
                "CDXXX_BZ":{
                    "maxlength":1000 
                }, 
                "example":{} //可继续追加jquery validate客户端验证条件
            },
            "errorClass": "form-list-item-warn",
            //errorPlacement: function (error, element) {element.attr("data-tips", error.text());},//关闭默认提示，使用鼠标提示框时使用
            submitHandler: function () {
                $("#CDXXX_Update").trigger("finish");
            }
        });
    
        $("#CDXXX_TPImage").click(function(){
            $.imageUpload("CDXXX_TP", 200, 200,$("#CDXXX_TP").val(), function(data){
                $("#CDXXX_TP").val(data);
            });
        });
        $("#CDXXX_MC").attr("data-tip","在左侧导航菜单中的显示名称");
        $("#CDXXX_XSSX").attr("data-tip","默认信息将按从小到大顺序排列");
        $("#CDXXX_LX").attr("data-tip","功能项目表示点击后跳转到指定的链接，功能列表表示点击后跳转至对应的子菜单列表");
        $("#CDXXX_LJ").attr("data-tip","当类型为功能项目时，填写调准的目标连接，否则留空");
        $("#CDXXX_TP").attr("data-tip","本地上传200*200的图片，或输入远程图片url");
        $("#CDXXX_BZ").attr("data-tip","可输入不超过300个汉字的纯文本信息，用于功能介绍，允许留空");
        $("#CDXXX_Update-Submit").click(function () {
            $("#CDXXX_Update").submit();
        });
    });
</script>

